<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8"%>
<%@ page import="com.centriole.common.component.ContextUtils"%>
<%
	String context = ContextUtils.logPrefix();
%>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>登录页面</title>
	<link rel="stylesheet" type="text/css" href="<%=context %>/ligerUI/lib/ligerUI/skins/Aqua/css/ligerui-all.css">
	<script src="<%=context %>/ligerUI/lib/jquery/jquery-1.9.0.min.js"></script>
	<script src="<%=context %>/ligerUI/lib/ligerUI/js/ligerui.all.js"></script>

</head>
<body>
<div style="margin-left:50px;margin-top:10px">


	日志级别:<select id="level">
	<option value="">全部</option>
	<option value="INFO">INFO</option>
	<option value="ERROR">ERROR</option>
	<option value="WARN">WARN</option>
	<option value="DEBUG">DEBUG</option>
</select>

	<input id="date" />
	msg
	信息：<input id="msg" size="42" tpye="text"/>
	<br>
	用户：<input id="user" size="42" type="text"/>
	<br>

	<input type="submit" value="查询" id="ok" class="l-button l-button-submit" >
</div>
<div id="log_list"></div>
</body>
<script>
    var grid;
    var path = '<%=context %>';
    $(function(){

        $("#level").ligerComboBox({width:300});
        $("#date").ligerDateEditor({ showTime: true, label: '时间', labelWidth: 38,width:300, labelAlign: 'left' });
        grid = $("#log_list").ligerGrid({
            columns: [
                {display: '级别', name: 'level', align: 'left', width: '10%' } ,
                {display: '日期', name: 'createTime', minWidth: '20%' },
                {display: '信息', name: 'message', width: '49%', align: 'left' },
                {display: '服务名', name: 'appName', width: '20%', align: 'left' }
            ],
            url: path+'/list',
            pageSize: 20,
            sortName: 'CustomerID',
            width: '100%',
            height: '99%',
            checkbox: false,
        });
        $("#ok").click(function(){

            grid.setOptions({
                parms:{
                    level:$("#level").val(),
                    createTime:$("#date").val(),
                    message:$("#msg").val(),
                    appName:$("#user").val()
                }
            });
            grid.reload(true);
        });
    })
</script>
</html>